#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main()
{
	int arr[1000] = { 0,1 };
	for (int i = 2; i < 20; i++)
	{
		if (i % 2 == 0)
		{
			arr[i] = arr[i - 1] + arr[i - 2];
		}
		else
		{
			int n = arr[i - 1] - arr[i - 2];
			arr[i] = abs(n);
		}
	}
	for (int i = 0, count = 1; i < 20; i++, count++)
	{
		printf("%d ", arr[i]);
		if (count % 4 == 0)
		{
			printf("\n");
		}
	}
	return 0;
}